package com.service.business.base.controller;

import com.service.business.base.controller.rep.CoinsRep;
import com.service.business.base.service.CoinService;
import com.service.business.framework.log.RequestLog;
import com.service.core.rest.BaseController;
import com.service.core.rest.response.MultiResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController()
@Api(tags = "币种相关")
@RequestMapping("coins")
public class CoinController extends BaseController {

    @Autowired
    private CoinService coinService;

    @ApiOperation("币种信息配置")
    @RequestLog("币种信息配置")
    @PostMapping("list")
    public MultiResponse<CoinsRep> list() {
        return successQueryMultiResponse(coinService.getCoins());
    }

}
